<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      7.8.&nbsp;Configuring the system hostname
    </title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="lfs" id="lfs-7.3">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 7.3
      </h4>
      <h3>
        Chapter&nbsp;7.&nbsp;Setting Up System Bootscripts
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="usage.html" title=
          "How Do These Bootscripts Work?">Prev</a>
          <p>
            How Do These Bootscripts Work?
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="setclock.html" title=
          "Configuring the setclock Script">Next</a>
          <p>
            Configuring the setclock Script
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter07.html" title=
          "Chapter&nbsp;7.&nbsp;Setting Up System Bootscripts">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-scripts-hostname" name="ch-scripts-hostname"></a>7.8.
        Configuring the system hostname
      </h1>
      <p>
        Part of the job of the <span class=
        "command"><strong>localnet</strong></span> script is setting the
        system's hostname. This needs to be configured in the <code class=
        "filename">/etc/sysconfig/network</code> file.
      </p>
      <p>
        Create the <code class="filename">/etc/sysconfig/network</code> file
        and enter a hostname by running:
      </p>
      <pre class="userinput">
<kbd class="command">echo "HOSTNAME=<em class=
"replaceable"><code>&lt;lfs&gt;</code></em>" &gt; /etc/sysconfig/network</kbd>
</pre>
      <p>
        <em class="replaceable"><code>&lt;lfs&gt;</code></em> needs to be
        replaced with the name given to the computer. Do not enter the Fully
        Qualified Domain Name (FQDN) here. That information is put in the
        <code class="filename">/etc/hosts</code> file.
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="usage.html" title=
          "How Do These Bootscripts Work?">Prev</a>
          <p>
            How Do These Bootscripts Work?
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="setclock.html" title=
          "Configuring the setclock Script">Next</a>
          <p>
            Configuring the setclock Script
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter07.html" title=
          "Chapter&nbsp;7.&nbsp;Setting Up System Bootscripts">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
